<template>
	<div class="page-wrap">
		<div class="page-content p-0">
			<div class="page-column p-0">
				<div class="page-form p-x-0">
					<el-form
						:model="ruleForm"
						label-position="left"
						label-width="154px"
						ref="form"
						label-suffix="："
					>	
					    <el-row>
							<el-col :span="24">
								<el-form-item label="数据导入">
									<!-- <el-button type="primary" size="small" @click="exportExcel">
											<img
												:style="{
													width: '12px',
													height: '12px'
												}"
												src="/img/basic/daochu.png"
												alt
											/>
											&nbsp;导出
										</el-button> -->
										<el-button type="primary" size="small" @click="daoru">
											<img
												:style="{
													width: '12px',
													height: '12px'
												}"
												src="/img/basic/daoru.png"
												alt
											/>
											&nbsp;导入
										</el-button>
										<input
											ref="file"
											id="img-upload"
											class="selectFile"
											type="file"
											@change="importf(this)"
											accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
										/>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="24">
								<!-- @input="addRDNUMRELNum"
										v-model.number="ruleForm.RDNUMRELNum"
										:disabled="this.senstivity_Data.RDRELFRC_VALUENum>0 " -->
								<el-form-item label="烟团释放" prop="RDNUMRELNum">
									<el-input
										size="medium"
										class="mediumForm"
										v-model.number="ruleForm.RDNUMRELNum"
										disabled
									>
										<template slot="append">套</template>
									</el-input>
								</el-form-item>
								<el-tabs :style="{'margin-left':'154px'}" class="m-20" v-model="activeName1" type="card">
									<el-tab-pane
										:label="item.index"
										:name="item.index"
										v-for="(item,index) in ruleForm.RDNUMRELList"
										:key="index"
									>
										<el-table ref="multipleTable" :data="item.RDNUMRELtab" tooltip-effect="dark" border>
											<el-table-column prop="index" label="烟团编号" align="center" min-width="120"></el-table-column>
											<el-table-column prop="RDREFTIM001" label="代表时间点" align="center" min-width="120">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.RDREFTIM001"
															@input="getData(scope.row)"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
											<el-table-column prop="RDPLUDUR001" label="释放持续时间（s）" align="center" min-width="120">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.RDPLUDUR001"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
											<el-table-column prop="RDPDELAY001" label="释放开始时间（s）" min-width="120" align="center">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.RDPDELAY001"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
											
											<el-table-column prop="WEBUILDH001" label="建筑物宽度（m）" align="center" min-width="120">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.WEBUILDW001"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
											<el-table-column prop="WEBUILDH001" label="建筑物高度（m）" align="center" min-width="120">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.WEBUILDH001"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
											<el-table-column prop="SIGYINIT001" label="Y方向扩散系数初始值(m)" align="center" min-width="120">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.SIGYINIT001"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
											<el-table-column prop="SIGZINIT001" label="Z方向扩散系数初始值(m)" min-width="120" align="center">
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row.SIGZINIT001"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
										</el-table>
									</el-tab-pane>
								</el-tabs>
							</el-col>
						</el-row>
						<div class="separate m-b-20"></div>
						<el-row>
							<el-col :span="24">
								<!-- @input="addRDRELFRC_VALUENUM"
								v-model.number="ruleForm.RDRELFRC_VALUENum"
								:disabled="this.senstivity_Data.RDNUMRELNum>0" -->
								<el-form-item label="烟团释放份额" prop="RDRELFRC_VALUENUM">
									<el-input
										size="medium"
										class="mediumForm"
										
										v-model.number="ruleForm.RDRELFRC_VALUENum"
										disabled
									>
										<template slot="append">套</template>
									</el-input>
								</el-form-item>
								<el-tabs :style="{'margin-left':'154px'}" class="m-20" v-model="activeName1" type="card">
									<el-tab-pane
										:label="item.index"
										:name="item.index"
										v-for="(item,index) in ruleForm.RDRELFRC_VALUEList"
										:key="index"
									>
										<el-table ref="multipleTable" :data="item.RDRELFRC_VALUETab" tooltip-effect="dark" border>
											<el-table-column prop="index" label="烟团编号" align="center" min-width="120"></el-table-column>
											<el-table-column
												v-for="(item,key) in basic_Data.ISMAXGRP001"
												:key="key"
												:prop="'item'+key"
												:label="'核素分组'+item"
												align="center"
												min-width="120"
											>
												<template slot-scope="scope">
													<el-form-item label-width="0px">
														<el-input
															oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,20})?).*$/g, '$1')"
															class="bigForm"
															v-model="scope.row[item]"
														></el-input>
													</el-form-item>
												</template>
											</el-table-column>
										</el-table>
									</el-tab-pane>
								</el-tabs>
							</el-col>
						</el-row>
					</el-form>
				</div>
				<div class="bottom-btn">
					<el-button type="primary" :loading="loading" @click="submitFun">提 交</el-button>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import selectPara from "@/components/selectPara"
import commCheckbox from "@/components/commCheckbox"
import ImageCropper from "@/components/ImageCropper"
import FixBottomButton from "@/components/FixBottomButton"
import ueditor from "@/components/ueditor"
import textLength from "@/components/common/comp/textLength"
import { commPara } from "@/mixins/mixins"
import { mapState } from "vuex"
import Axios from "axios"
import { dome, selecttext } from "@/utils/verify.js"
import FileSaver from "file-saver"
import XLSX from "xlsx"
export default {
	name: "aboutUs",
	props: {
		basicDataF: Object,
	},
	mixins: [commPara],
	components: {
		selectPara,
		ImageCropper,
		textLength,
		commCheckbox,
		FixBottomButton,
		ueditor,
	},

	data() {
		return {
			activeTab:'6',
			ISMAXGRP001: "1",
			RDNUMREL001: 1,
			activeName: "1",
			activeName1: "1",
			ruleForm: {
				RDNUMRELNum: 0,
				RDNUMRELList: [
					{
						index: "1",
					},
				],
				RDRELFRC_VALUENum: 0,
				RDRELFRC_VALUEList: [],
			},

			RDMAXRIS001options: [],
			loading: false,
		}
	},
	computed: {
		...mapState({
			senstivity_Data: (state) => state.token.senstivity_Data,
			basic_Data: (state) => state.token.basic_Data,
		}),
	},
	created() {
		// this.queryDetail()
	},
	mounted() {
		this.setData()
	},
	methods: {
		getData(a) {
			console.log(a)
		},
		setData() {
			this.ruleForm.RDNUMRELNum = this.senstivity_Data.yantuans.length
			this.ruleForm.RDRELFRC_VALUENum = this.senstivity_Data.yantuans.length
			this.addRDNUMRELNum()
			this.addRDRELFRC_VALUENUM()
		},
		importf(obj) {
			//导入数据 
			let _this = this
			let inputDOM = this.$refs.inputer // 通过DOM取文件数据 
			this.file = event.currentTarget.files[0]
			var rABS = false //是否将文件读取为二进制字符串
			var f = this.file
			var reader = new FileReader()
			//if (!FileReader.prototype.readAsBinaryString) {
			FileReader.prototype.readAsBinaryString = function (f) {
				var binary = ""
				var rABS = false //是否将文件读取为二进制字符串
				var pt = this
				var wb //读取完成的数据
				var outdata
				var reader = new FileReader()
				reader.onload = function (e) {
					var bytes = new Uint8Array(reader.result)
					var length = bytes.byteLength
					for (var i = 0; i < length; i++) {
						binary += String.fromCharCode(bytes[i])
					}
					var XLSX = require("xlsx")
					if (rABS) {
						wb = XLSX.read(btoa(fixdata(binary)), {
							//手动转化
							type: "base64",
						})
					} else {
						wb = XLSX.read(binary, {
							type: "binary",
						})
					}
					// outdata就是你想要的东西 excel导入的数据
					outdata = XLSX.utils.sheet_to_json(
						wb.Sheets[wb.SheetNames[0]]
					)
					let groupType = _this.basic_Data.ISMAXGRP001
					let xlsxCols =  Object.keys(outdata[0])
					let xlsxGL = xlsxCols.length - 10
					if(groupType.length != xlsxGL||xlsxGL.length>9){
						_this.$notify.error({
							title: "上传失败",
							message: '核素分组数量不正确请重新上传',
							type: "success",
						})
						return false
					}
					let newName = []
					let newCol = []
					xlsxCols.forEach(item=>{
						if(item!='事故序列名称'&&item!='起始时间'&&item!='结束时间'&&item!='持续时间'&&item!='代表时间点'&&item!='释放热量'&&item!='释放高度'&&item!='建筑物高度'&&item!='风险区域烟团'){
							newCol.push(item)
						}
					})
					groupType.forEach(item=>{
						if(item=='铷组'){
							newName.push('贵金属')
						}
						if(item == '铯组'){
							newName.push('碱金属')
						}
						if(item == '惰性气体'){
							newName.push('惰性气体')
						}
						if(item == '卤素'){
							newName.push('卤素')
						}
						if(item == '碲组'){
							newName.push('碲族')
						}
						if(item == '锶组'){
							newName.push('锶')
						}
						if(item == '镧系'){
							newName.push('镧系')
						}
						if(item == '铈族'){
							newName.push('铈组')
						}
						if(item == '钡组'){
							newName.push('钡')
						}
					})
					let arr = newName.filter(function (val) { return newCol.indexOf(val) === -1 })
					if(arr.length!=0){
						_this.$notify.error({
							title: "上传失败",
							message: '核素分组类型不正确请重新上传',
							type: "success",
						})
					}
					_this.ruleForm.RDNUMRELList = []
					_this.ruleForm.RDRELFRC_VALUEList = []
					let groupName = outdata[0]['事故序列名称']
					let groupArr = []
					let groupArr2 = []
					let groupId = 1
					for(let i = 0;i<outdata.length;i++){
						if(groupName != outdata[i]['事故序列名称']){
							console.log('第'+i+'组')
							_this.ruleForm.RDNUMRELList.push({
								index:groupId.toString(),
								RDNUMRELtab:groupArr
							})
							_this.ruleForm.RDRELFRC_VALUEList.push({
								index:groupId.toString(),
								RDRELFRC_VALUETab:groupArr2
							})
							groupId++
							groupName = outdata[i]['事故序列名称']
							groupArr = []
							groupArr2 = []
							
						}
						
						    let obj = {
								index: i + 1,
								name:outdata[i]['事故序列名称'],
								RDREFTIM001: outdata[i]['代表时间点'],
								RDPLHEAT001: outdata[i]['释放热量'],
								RDPLHITE001: outdata[i]['释放高度'],
								RDPLUDUR001: outdata[i]['持续时间'],
								RDPDELAY001: outdata[i]['起始时间'],
								WEBUILDW001: outdata[i]['建筑物宽度'],
								WEBUILDH001: outdata[i]['建筑物高度'],
								SIGYINIT001: parseFloat(outdata[i]['建筑物高度']) / 4.3,
								SIGZINIT001: parseFloat(outdata[i]['建筑物高度']) / 2.15,
							}
							let rowObj = {
								index: i + 1,
								'铷组': outdata[i]['贵金属'],
								'惰性气体': outdata[i]['惰性气体'],
								'铯组': outdata[i]['碱金属'],
								'锶组': outdata[i]['锶'],
								'镧系': outdata[i]['镧系'],
								'碲组': outdata[i]['碲族'],
								'卤素': outdata[i]['卤素'],
								'钡组': outdata[i]['钡'],
								'铈组': outdata[i]['铈族'],
							}
							// let rowObj = {
							// 	index: i + 1,
							// 	item0: outdata[i]['贵金属'],
							// 	item1: outdata[i]['惰性气体'],
							// 	item2: outdata[i]['碱金属'],
							// 	item3: outdata[i]['锶'],
							// 	item4: outdata[i]['镧系'],
							// 	item5: outdata[i]['碲族'],
							// 	item6: outdata[i]['卤素'],
							// 	item7: outdata[i]['钡'],
							// 	item8: outdata[i]['铈族'],
							// }
							groupArr.push(obj)
							groupArr2.push(rowObj)
						
					}
					_this.ruleForm.RDNUMRELList.push({
						index:groupId.toString(),
						RDNUMRELtab:groupArr
					})
					_this.ruleForm.RDRELFRC_VALUEList.push({
						index:groupId.toString(),
						RDRELFRC_VALUETab:groupArr2
					})
					_this.ruleForm.RDNUMRELNum = _this.ruleForm.RDNUMRELList.length
					_this.ruleForm.RDRELFRC_VALUENum = _this.ruleForm.RDRELFRC_VALUEList.length
					let tempdata = JSON.parse(JSON.stringify(_this.senstivity_Data))
					tempdata.RDNUMRELNum = _this.ruleForm.RDNUMRELNum
					tempdata.RDRELFRC_VALUENum = _this.ruleForm.RDRELFRC_VALUENum
					_this.$store.dispatch("upData_senstivity_Data", tempdata)
				}
				reader.readAsArrayBuffer(f)
			}
			if (rABS) {
				reader.readAsArrayBuffer(f)
			} else {
				reader.readAsBinaryString(f)
			}
		},
		addRDNUMRELNum() {
			this.ruleForm.RDNUMRELList = []
			for (let index = 1; index <= parseInt(this.senstivity_Data.yantuans.length); index++) {
				let tabdata= this.senstivity_Data.yantuans[index-1].RDREFTIM001.map((item,i)=>{
					return {
						index: i+1,
						RDREFTIM001:item||'',
						RDPLHEAT001:this.senstivity_Data.yantuans[index-1].RDPLHEAT001[i],
						RDPLHITE001:this.senstivity_Data.yantuans[index-1].RDPLHITE001[i],
						RDPLUDUR001:this.senstivity_Data.yantuans[index-1].RDPLUDUR001[i],
						RDPDELAY001:this.senstivity_Data.yantuans[index-1].RDPDELAY001[i],
						WEBUILDW001:this.senstivity_Data.yantuans[index-1].WEBUILDW001[i],
						WEBUILDH001:this.senstivity_Data.yantuans[index-1].WEBUILDH001[i],
						SIGYINIT001:this.senstivity_Data.yantuans[index-1].SIGYINIT001[i],
						SIGZINIT001:this.senstivity_Data.yantuans[index-1].SIGZINIT001[i]
					}
				})
				this.ruleForm.RDNUMRELList.push({
					index: index.toString(),
					RDNUMRELtab: tabdata
				})
			}
			console.log(this.senstivity_Data.yantuans.length)
			console.log(this.ruleForm.RDNUMRELList)
			let tempdata = JSON.parse(JSON.stringify(this.senstivity_Data))
			tempdata.RDNUMRELNum = this.ruleForm.RDNUMRELNum
			this.$store.dispatch("upData_senstivity_Data", tempdata)
		},
		addRDRELFRC_VALUENUM(value) {
			this.ruleForm.RDRELFRC_VALUEList = []
			for (let index = 1; index <= this.senstivity_Data.yantuans.length; index++) {
				let tabdata= this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE.map((item,i)=>{
					return {
						index: i+1,
						[this.basic_Data.ISMAXGRP001[0]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][0],
						[this.basic_Data.ISMAXGRP001[1]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][1],
						[this.basic_Data.ISMAXGRP001[2]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][2],
						[this.basic_Data.ISMAXGRP001[3]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][3],
						[this.basic_Data.ISMAXGRP001[4]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][4],
						[this.basic_Data.ISMAXGRP001[5]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][5],
						[this.basic_Data.ISMAXGRP001[6]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][6],
						[this.basic_Data.ISMAXGRP001[7]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][7],
						[this.basic_Data.ISMAXGRP001[8]]:this.senstivity_Data.yantuans[index-1].RDRELFRC_VALUE[i][8],
					}
				})
				this.ruleForm.RDRELFRC_VALUEList.push({
					index: index.toString(),
					RDRELFRC_VALUETab:tabdata
				})
				
			}
			console.log(this.ruleForm.RDRELFRC_VALUEList)
			let tempdata = JSON.parse(JSON.stringify(this.senstivity_Data))
			tempdata.RDRELFRC_VALUENum = this.ruleForm.RDRELFRC_VALUENum
			this.$store.dispatch("upData_senstivity_Data", tempdata)
		},
		submitFun() {
			this.$refs.form.validate((valid) => {
				if (valid) {
					let tempdata = JSON.parse(
						JSON.stringify(this.senstivity_Data)
					)
					if (this.ruleForm.RDNUMRELNum > 0) {
						tempdata.RDREFTIM001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.RDREFTIM001
										? parseFloat(i.RDREFTIM001)
										: 0
								})
								return temp
							}
						)

						tempdata.RDPLHEAT001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.RDPLHEAT001
										? parseFloat(i.RDPLHEAT001)
										: 0
								})
								return temp
							}
						)
						tempdata.RDPLHITE001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.RDPLHITE001
										? parseFloat(i.RDPLHITE001)
										: 0
								})
								return temp
							}
						)
						tempdata.RDPLUDUR001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.RDPLUDUR001
										? parseFloat(i.RDPLUDUR001)
										: 0
								})
								return temp
							}
						)
						tempdata.RDPDELAY001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.RDPDELAY001
										? parseFloat(i.RDPDELAY001)
										: 0
								})
								return temp
							}
						)
						tempdata.WEBUILDW001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.WEBUILDW001
										? parseFloat(i.WEBUILDW001)
										: 0
								})
								return temp
							}
						)
						tempdata.WEBUILDH001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.WEBUILDH001
										? parseFloat(i.WEBUILDH001)
										: 0
								})
								return temp
							}
						)
						tempdata.SIGYINIT001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.SIGYINIT001
										? parseFloat(i.SIGYINIT001)
										: 0
								})

								return temp
							}
						)

						tempdata.SIGZINIT001 = this.ruleForm.RDNUMRELList.map(
							(item) => {
								let temp = item.RDNUMRELtab.map((i) => {
									return i.SIGZINIT001
										? parseFloat(i.SIGZINIT001)
										: 0
								})
								return temp
							}
						)
						
					} else {
						tempdata.RDREFTIM001 = []
						tempdata.RDPLHEAT001 = []
						tempdata.RDPLHITE001 = []
						tempdata.RDPLUDUR001 = []
						tempdata.RDPDELAY001 = []
						tempdata.WEBUILDH001 = []
						tempdata.SIGYINIT001 = []
						tempdata.SIGZINIT001 = []
						tempdata.yantuans = []
					}

					if (this.ruleForm.RDRELFRC_VALUENum > 0) {
						tempdata.RDRELFRC_VALUE = this.ruleForm.RDRELFRC_VALUEList.map(
							(item) => {
								let temptabitem = []
								item.RDRELFRC_VALUETab.forEach((item2) => {
									let tempitem = []
									for (const key in item2) {
										if (item2.hasOwnProperty(key)) {
											const element = item2[key]
											tempitem.push(
												parseFloat(element)
													? parseFloat(element)
													: 0
											)
										}
									}
									tempitem.splice(0, 1)
									tempitem.splice(
										this.basic_Data.ISMAXGRP001.length
									)
									temptabitem.push(tempitem)
								})
								return temptabitem
							}
						)
						// tempdata.yantuans.push({
						// 	RDRELFRC_VALUE:tempdata.RDRELFRC_VALUE
						// })
					} else {
						tempdata.RDRELFRC_VALUE = []
					}
					tempdata.yantuans = []
					tempdata.RDREFTIM001.forEach((item,index)=>{
						let obj = {
							RDNUMREL001:tempdata.RDREFTIM001[index].length, //分割数量
							RDREFTIM001:tempdata.RDREFTIM001[index],
							RDPLHEAT001:tempdata.RDPLHEAT001[index],
							RDPLHITE001:tempdata.RDPLHITE001[index],
							RDPLUDUR001:tempdata.RDPLUDUR001[index],
							RDPDELAY001:tempdata.RDPDELAY001[index],
							WEBUILDW001:tempdata.WEBUILDW001[index],
							WEBUILDH001:tempdata.WEBUILDH001[index],
							SIGYINIT001:tempdata.SIGYINIT001[index],
							SIGZINIT001:tempdata.SIGZINIT001[index],
							RDRELFRC_VALUE:tempdata.RDRELFRC_VALUE[index],
						}
						tempdata.yantuans.push(obj)
					})
					this.$store.dispatch("upData_senstivity_Data", tempdata)
					let subdata = {
						WDCWASH1001:tempdata.WDCWASH1001,
						WDCWASH2001:tempdata.WDCWASH2001,
						DDVDEPOS_VALUE:tempdata.DDVDEPOS_VALUE,
						DPCYSIGA:tempdata.DPCYSIGA,
						DPCYSIGB:tempdata.DPCYSIGB,
						DPCZSIGA:tempdata.DPCZSIGA,
						DPCZSIGB:tempdata.DPCZSIGB,
						DPYSCALE001:tempdata.DPYSCALE001,
						DPZSCALE001:tempdata.DPZSCALE001,
						PMXPFAC1001:tempdata.PMXPFAC1001,
						PMXPFAC2001:tempdata.PMXPFAC2001,
						PRSCLCRW001:tempdata.PRSCLCRW001,
						PRSCLADP001:tempdata.PRSCLADP001,
						PRSCLEFP001:tempdata.PRSCLEFP001,
						yantuans:tempdata.yantuans
					}
					let params = {
						batchid: this.$route.query.id,
						batchinfo: "MINGAN",
						submitjson: JSON.stringify(subdata),
					}
					this.$appApi
						.BATCH_SUBMIT(params)
						.then((res) => {
							// console.log(res)
							var str = res.data.substring(0, 1)
							var message = res.data.substring(6)
							if (str == "E") {
								this.$notify.error({
									title: "提交失败！",
									message: message,
									type: "success",
								})
							} else if (str == "S") {
								this.$notify({
									message: "提交成功！",
									type: "success",
								})
								this.$router.go(-1)
							}
						})
						.catch((err) => {
							console.log(err)
						})
				}
			})
		},
		daoru() {
			this.$refs.file.click()
		},
	},
}
</script>
<style lang="scss" scoped>
.page-flex-row /deep/ .el-collapse-item__header {
	background: #f3f9fe;
}
#img-upload {
	display: none;
}
</style>